/* 搜索区域样式 */
.notes-search-section {
    background: white;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-search-input {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.notes-search-input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.notes-search-input::placeholder {
    color: #999;
}

.notes-search-clear {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.notes-search-clear:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #666;
}

.notes-search-clear.visible {
    display: flex;
}

/* 搜索结果样式 */
.notes-item.hidden {
    display: none;
}

.notes-group.empty {
    display: none;
}

/* 笔记容器样式 */
.notes-container {
    width: 90%;
    max-width: 800px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
}

.notes-wrapper {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fafafa;
    overscroll-behavior: contain;
}

/* 笔记输入区域 */
.notes-input-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 16px;
    transition: all 0.2s ease;
}

.notes-input-section:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.notes-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.notes-button-container {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.notes-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notes-button.save {
    background: #4CAF50;
    color: white;
}

.notes-button.save:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.notes-button.cancel {
    background: #f0f0f0;
    color: #666;
}

.notes-button.cancel:hover {
    background: #e8e8e8;
}

/* 笔记历史记录区域 */
.notes-history-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.notes-history-title {
    margin: 0;
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #eee;
}

.notes-history-list {
    padding: 16px;
}

.notes-empty,
.notes-error {
    text-align: center;
    padding: 32px;
    color: #999;
    font-size: 14px;
}

.notes-error {
    color: #ff4444;
}

/* 笔记组样式 */
.notes-group {
    margin-bottom: 24px;
}

.notes-group:last-child {
    margin-bottom: 0;
}

.notes-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.notes-group-title {
    font-size: 14px;
    color: #2196F3;
    text-decoration: none;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-group-title:hover {
    text-decoration: underline;
}

.notes-group-count {
    font-size: 12px;
    color: #999;
}

/* 笔记项样式 */
.notes-item {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.notes-item:last-child {
    margin-bottom: 0;
}

.notes-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.notes-item.new {
    animation: slideDown 0.3s ease-out;
    border-color: #4CAF50;
}

.notes-item.deleting {
    animation: fadeOut 0.3s ease-out forwards;
}

.notes-item-content {
    padding: 12px 16px;
}

.notes-item-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.notes-item-meta {
    font-size: 12px;
    color: #999;
}

.notes-item-actions {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #fafafa;
    border-top: 1px solid #eee;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notes-item:hover .notes-item-actions {
    opacity: 1;
}

.notes-action-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.notes-action-btn:first-child {
    margin-left: 0;
}

.notes-action-btn.copy:hover {
    color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
}

.notes-action-btn.delete:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.08);
}

/* 页面标题 */
.note-page-title {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 笔记编辑按钮样式 */
.notes-action-btn.edit {
    color: #FFA500;
    font-size: 16px;
}

.notes-action-btn.edit:hover {
    color: #FF8C00;
    background: rgba(255, 165, 0, 0.1);
}

/* 编辑状态的笔记项样式 */
.notes-item.editing {
    border-color: #FFA500;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.1);
}

/* 编辑输入框样式 */
.notes-edit-input {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
    outline: none;
    background: #fff;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.notes-edit-input:focus {
    border-color: #FFA500;
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.1);
}

/* 编辑操作按钮容器 */
.notes-edit-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.notes-edit-save,
.notes-edit-cancel {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notes-edit-save {
    background: #4CAF50;
    color: white;
}

.notes-edit-save:hover {
    background: #45a049;
}

.notes-edit-cancel {
    background: #f0f0f0;
    color: #666;
}

.notes-edit-cancel:hover {
    background: #e8e8e8;
}

/* 便签颜色按钮组 */
.sticky-note-colors {
    display: flex;
    gap: 4px;
    margin-right: 8px;
}

.sticky-note-color-btn {
    width: 20px;
    height: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.sticky-note-color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sticky-note-color-btn.selected {
    border: 2px solid #4CAF50;
    transform: scale(1.1);
}

/* 调整便签操作按钮区域的布局 */
.sticky-note-actions {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-top: 1px solid #eee;
    margin-top: auto;
    margin-left: -16px;
    margin-right: -16px;
    margin-bottom: 0px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* 便签卡片 */
.sticky-note-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 150px;
    padding: 16px 16px 16px 16px;
}

/* 便签内容 */
.sticky-note-content {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
    flex: 1;
    margin-bottom: 8px;
}

/* 便签元信息 */
.sticky-note-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

/* 笔记容器样式 */
.notes-container {
    width: 90%;
    max-width: 800px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
}

.notes-wrapper {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #fafafa;
    overscroll-behavior: contain;
}

/* 笔记输入区域 */
.notes-input-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    padding: 16px;
    transition: all 0.2s ease;
}

.notes-input-section:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notes-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
}

.notes-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.notes-button-container {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.notes-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notes-button.save {
    background: #4CAF50;
    color: white;
}

.notes-button.save:hover {
    background: #45a049;
    transform: translateY(-1px);
}

.notes-button.cancel {
    background: #f0f0f0;
    color: #666;
}

.notes-button.cancel:hover {
    background: #e8e8e8;
}

/* 笔记历史记录区域 */
.notes-history-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.notes-history-title {
    margin: 0;
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #eee;
}

.notes-history-list {
    padding: 16px;
}

.notes-empty,
.notes-error {
    text-align: center;
    padding: 32px;
    color: #999;
    font-size: 14px;
}

.notes-error {
    color: #ff4444;
}

/* 笔记组样式 */
.notes-group {
    margin-bottom: 24px;
}

.notes-group:last-child {
    margin-bottom: 0;
}

.notes-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.notes-group-title {
    font-size: 14px;
    color: #2196F3;
    text-decoration: none;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-group-title:hover {
    text-decoration: underline;
}

.notes-group-count {
    font-size: 12px;
    color: #999;
}

/* 笔记项样式 */
.notes-item {
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.notes-item:last-child {
    margin-bottom: 0;
}

.notes-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.notes-item.new {
    animation: slideDown 0.3s ease-out;
    border-color: #4CAF50;
}

.notes-item.deleting {
    animation: fadeOut 0.3s ease-out forwards;
}

.notes-item-content {
    padding: 12px 16px;
}

.notes-item-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    word-break: break-word;
    margin-bottom: 8px;
    white-space: pre-wrap;
}

.notes-item-meta {
    font-size: 12px;
    color: #999;
}

.notes-item-actions {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #fafafa;
    border-top: 1px solid #eee;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.notes-item:hover .notes-item-actions {
    opacity: 1;
}

.notes-action-btn {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.notes-action-btn:first-child {
    margin-left: 0;
}

.notes-action-btn.copy:hover {
    color: #2196F3;
    background: rgba(33, 150, 243, 0.1);
}

.notes-action-btn.delete:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.08);
}

/* 页面标题 */
.note-page-title {
    font-size: 12px;
    color: #999;
    margin-left: 8px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}